import {
  USER_NOT_VERIFIED, USER_VERIFYING, USER_AUTO_VERIFY_FAILED, USER_VERIFY_FAILED, USER_VERIFIED, USER_MANUAL_VERIFIED,
  CALL_OPTIONS, PUT_OPTIONS,
  ORDER_LIST_RUNNING_TAB, ORDER_LIST_SETTLED_TAB, ORDER_LIST_PENDING_TAB,
  STOCK_TIME_SHARE_CHART_TAB, STOCK_24_CANDLESTICK_CHART_TAB, STOCK_5_CANDLESTICK_CHART_TAB, STOCK_15_CANDLESTICK_CHART_TAB, STOCK_30_CANDLESTICK_CHART_TAB, STOCK_POSITION_TAB,
  ORDER_INVALID, ORDER_PENDING, ORDER_CREATED, ORDER_CANCELING, ORDER_CANCELED, ORDER_POSITION, ORDER_CLOSING_OUT, ORDER_CLOSED_OUT, ORDER_SETTLING, ORDER_SETTLED,
  ACCOUNT_RECHARGE, ACCOUNT_WITHDRAW, ACCOUNT_TRADE, ACCOUNT_COMMISSION,
  AMOUNT_PROCESSING, AMOUNT_PROCESSED, AMOUNT_TERMINATED, AMOUNT_TIMEOUT, AMOUNT_MANUAL_CONFIRMING,
  RECHARGE_BY_GATEWAY, RECHARGE_BY_GATEWAY_QUICK, RECHARGE_BY_ALIPAY, RECHARGE_BY_WECHAT
} from './consts'
import { getBaseUrl } from '../utils/helper'

export const version = '1.0'
export const wsPort = '6001'
export const baseUrl = getBaseUrl()
export const apiUrl = `${baseUrl}/api`
export const ossUrl = 'http://otc-options-public.oss-cn-beijing.aliyuncs.com'

export const formInvalidMessage = '你的输入有误，请修正后再试！'
export const noDataText = '未查询到任何记录'
export const noResultsText = '未查询到任何记录，请放宽检索条件'

export const timeout = 7200000 // 过期后自动退出系统，2小时

export const perPage = 12
export const pages = [
  {text: '12', value: 12},
  {text: '15', value: 15},
  {text: '20', value: 20},
  {text: '50', value: 50},
  {text: '100', value: 100}
]
export const shadowLevel = 6
export const smsResendInterval = 60

export const userVerifiedStates = [
  {text: '全部', value: null},
  {text: '未实名', value: USER_NOT_VERIFIED},
  {text: '资料认证中', value: USER_VERIFYING},
  {text: '等待人工审核', value: USER_AUTO_VERIFY_FAILED},
  {text: '资料认证失败', value: USER_VERIFY_FAILED},
  {text: '实名认证成功', value: USER_VERIFIED},
  {text: '实名认证成功', value: USER_MANUAL_VERIFIED}
]
export const orderListTabs = [
  {text: '进行中', value: ORDER_LIST_RUNNING_TAB},
  {text: '已结算', value: ORDER_LIST_SETTLED_TAB},
  {text: '未完成', value: ORDER_LIST_PENDING_TAB}
]
export const stockChartTabs = [
  {text: '分时', value: STOCK_TIME_SHARE_CHART_TAB},
  {text: '日线', value: STOCK_24_CANDLESTICK_CHART_TAB},
  {text: '5分钟', value: STOCK_5_CANDLESTICK_CHART_TAB},
  {text: '15分钟', value: STOCK_15_CANDLESTICK_CHART_TAB},
  {text: '30分钟', value: STOCK_30_CANDLESTICK_CHART_TAB},
  {text: '盘口', value: STOCK_POSITION_TAB}
]
export const optionsTypes = [
  {text: '认购', value: CALL_OPTIONS},
  {text: '认沽', value: PUT_OPTIONS}
]
export const orderStates = [
  {text: '已失效', value: ORDER_INVALID},
  {text: '待确认', value: ORDER_PENDING},
  {text: '申报中', value: ORDER_CREATED},
  {text: '撤销中', value: ORDER_CANCELING},
  {text: '已撤销', value: ORDER_CANCELED},
  {text: '持仓中', value: ORDER_POSITION},
  {text: '行权中', value: ORDER_CLOSING_OUT},
  {text: '已行权', value: ORDER_CLOSED_OUT},
  {text: '结算中', value: ORDER_SETTLING},
  {text: '已结算', value: ORDER_SETTLED}
]
export const amountTypes = [
  {text: '入金', value: ACCOUNT_RECHARGE},
  {text: '提现', value: ACCOUNT_WITHDRAW},
  {text: '期权交易', value: ACCOUNT_TRADE},
  {text: '推广佣金', value: ACCOUNT_COMMISSION}
]
export const flowStates = [
  {text: '处理中', value: AMOUNT_PROCESSING},
  {text: '处理完成', value: AMOUNT_PROCESSED},
  {text: '因错误终止', value: AMOUNT_TERMINATED},
  {text: '已超时', value: AMOUNT_TIMEOUT},
  {text: '处理中', value: AMOUNT_MANUAL_CONFIRMING}
]
export const payMethods = [
  {text: '银行', value: RECHARGE_BY_GATEWAY},
  {text: '银行', value: RECHARGE_BY_GATEWAY_QUICK},
  {text: '支付宝', value: RECHARGE_BY_ALIPAY},
  {text: '微信', value: RECHARGE_BY_WECHAT}
]

export const banks = [
  {text: '工商银行', value: 'ICBC'},
  {text: '招商银行', value: 'CMBCHINA'},
  {text: '中国农业银行', value: 'ABC'},
  {text: '建设银行', value: 'CCB'},
  {text: '交通银行', value: 'BOCO'},
  {text: '兴业银行', value: 'CIB'},
  {text: '中国民生银行', value: 'CMBC'},
  {text: '光大银行', value: 'CEB'},
  {text: '中国银行', value: 'BOC'},
  {text: '中信银行', value: 'ECITIC'},
  {text: '深圳发展银行', value: 'SDB'},
  {text: '广发银行', value: 'GDB'},
  {text: '上海浦东发展银行', value: 'SPDB'},
  {text: '中国邮政', value: 'POST'},
  {text: '平安银行', value: 'PINGANBANK'},
  {text: '华夏银行', value: 'HXB'},
  {text: '东亚银行', value: 'HKBEA'}
]
